Tile = {}
Tile.__index = Tile
 
function Tile.new()
    local instance = {
      xCoordinate = nil,
      yCoordinate = nil,
      WorldObject = nil,
      Building = nil,
      Unit = nil,
      canUnitBePlaced = nil,
      fogObject = nil
    }
    
    setmetatable(instance, Tile)
    return instance
end

function Tile:getFogObject()
  return self.fogObject
end

function Tile:setFogObject(_fog)
  self.fogObject = _fog
end

function Tile:getType()
  return "Tile"
end

function Tile:getCanUnitBePlaced()
  if self.Unit == nil and self.WorldObject:getType() ~= "Water" then
    return true
  else
    return false
  end
end
 
function Tile:getWorldObject()
 return self.WorldObject
end
 
function Tile:setWorldObject(_WorldObject)
  self.WorldObject = _WorldObject
end

function Tile:setBuilding(_Building)
  self.Building = _Building
end

function Tile:getBuilding()
 return self.Building
end

function Tile:setUnit(_Unit)
  self.Unit = _Unit
end

function Tile:getUnit()
 return self.Unit
end

return Tile